/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package comunicacao;

import javax.faces.context.FacesContext;
import main.Principal;
import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;

/**
 *
 * @author Leonardo Lino
 */
public class DataWatcherRunnable implements Runnable, Watcher, AsyncCallback.StatCallback {
    
    ZooKeeper zk;
    Principal principal;

    public DataWatcherRunnable(ZooKeeper zk, Principal principal) {
        this.zk = zk;
        this.principal = principal;
    }

  

    
    
    

    @Override
    public void run() {
  
        int clientID = principal.getClientID();
        
        System.out.println("clientID: " + clientID);
        
    }

    @Override
    public void process(WatchedEvent event) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void processResult(int rc, String path, Object ctx, Stat stat) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
}
